﻿using System;
using System.Reflection;

namespace ProbeWebServer
{
    class Program
    {
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                DisplayUsage();
            }
            else
            {
                BingProbe probe = new BingProbe();
                probe.ListSites(args[0]);
            }
        }

        static void DisplayUsage()
        {
            string version = "";

            try
            {
                version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
            }
            catch
            {
                version = "1.0";
            }

            Console.WriteLine("Probe Web Server - v" + version + System.Environment.NewLine );
            Console.WriteLine( System.Environment.NewLine );

            Console.WriteLine("Usage: ProbeWebServer.exe <IPADDRESS>" + System.Environment.NewLine);
        }
    }
}
